<?php

namespace app\api\controller\v1;

use app\api\controller\BaseController;
use app\api\service\Pay as PayService;
use app\api\validate\IDMustBePositiveInt;

class Pay extends BaseController
{

    protected $beforeActionList = [
        'checkExclusiveScope' => [ 'only' => 'getPreOrder' ]
    ];

    public function getPreOrder($id = '')
    {
        (new IDMustBePositiveInt())->goCheck();
//        设置订单号  
        $pay = new PayService($id);
        return $pay->pay();
    }

    public function redirectNotify()
    {
        
    }

    public function notifyConcurrency()
    {
        
    }

    public function receiveNotify()
    {
        
    }

}
